package salary

import "time"

// 判断是否在时间区间内.
func IsBetween(date string, start string, end string) bool {
	dateParse := Str2Date(date)
	startParse := Str2Date(start)
	endParse := Str2Date(end)
	return dateParse.Unix() >= startParse.Unix() && dateParse.Unix() <= endParse.Unix()
}
// 字符串转时间
func Str2Date(dateStr string) time.Time {
	dateParse, _ := time.Parse("2006-01-02", dateStr)
	return dateParse
}
